package brush;

import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

import org.junit.Before;
import org.junit.Test;

import shape.Circle;
import shape.Square;
import surface.Canvas;
import brush.BrushFactory;
import brush.BrushStateContext;

public class BrushesTest {

	private Canvas canvas;
	private BrushStateContext brush;
	
	@Before
	public void setUp() {
		canvas = mock(Canvas.class);
	}
	
	@Test
	public void testSquareBrush() {
		brush = BrushFactory.squareBrush(canvas, 50, 50, 50);
		brush.draw();
		verify(canvas, times(1)).addShape(any(Square.class));
	}
	
	@Test
	public void testCircleBrush() {
		brush = BrushFactory.circleBrush(canvas, 50, 50, 50);
		brush.draw();
		verify(canvas, times(1)).addShape(any(Circle.class));
	}
}
